using System;
using System.Runtime.Serialization;

namespace SharedObjects
{
	/// <summary>
	/// note: Program functionality is defined serverside.
	/// </summary>
	[DataContract] 
	[ReferencedBy(typeof(ProgramFile))]
	public class Program : EntityBase
	{
		[DataMember] public string Name { get; set; }
		[DataMember] public ulong InterfaceId { get; set; }
		[DataMember] public string MethodName { get; set; }

		[DataMember] public int Version { get; set; }
		[DataMember] public int Size { get; set; }

		[DataMember] public bool IsAdminOnly { get; set; }
		[DataMember] public bool IsDefault { get; set; }
		[DataMember] public bool AllowModification { get; set; }
		[DataMember] public long BasePrice { get; set; }
		[DataMember] public int MinimumDifficulty { get; set; }

		[DataMember] public ProgramCategory Category { get; set; }
		[DataMember] public SpeedType SpeedType { get; set; }
		[DataMember] public double SpeedModifier { get; set; } //multiplicator with which the 1 sec default animation time will be modified.
	}

	public enum SpeedType
	{
		Bandwidth,
		Cpu
	}

	[AttributeUsage(AttributeTargets.Method)]
	public class ProgramMethodAttribute : Attribute
	{

	}
}